const express = require('express');
const wearService = require('../services/wearService');

var router = express.Router();

router.use('/shop/data',async function (req,res,next){
    var GET = req.query;
    var kind = GET.kind;
    if(kind==[]||kind=={}||kind==null||kind==undefined){
        kind = 'mobiles'
    }
    var data = await wearService.findByKind(kind);
    res.send(data);
});

exports.router = router;